﻿@using Janus.Mes.WebClient;
@using Janus.BaseEntitys;
@using Janus.Mes.VO;
@model EquiCatHVO
@{
    Layout = null;
    ViewBag.ViewTitle = "设备类别主表";
    if (ViewBag.IsCreate)
    {
        Model.IsSchPlan = false;
        Model.IsEnable = true;
    }
}
<div class="pageContent">
    <form method="post" action="BaseData/EquipmentCategory/create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <input id="hidIsCreate" name="hidIsCreate" type="hidden" value="@ViewBag.IsCreate" />
            @Html.HiddenFor(model => model.Id)
            <div class="MyPanel">
                <b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b>
                <div class="b d1 k">
                    <div class="Title">设备类别</div>
                    <div class="Content">
                        <div inited="1000" style="display: block;">
                            <p>
                                <label>
                                    编码：
                                </label>
                                @if (ViewBag.IsCreate == true)
                                {
                                    @Html.TextBoxFor(c => c.CatCode, new { @class = "required IsExisted", ajax = "BaseData/AGVPositionChip/IsExist" })
                                }
                                else
                                {
                                    @Html.TextBoxFor(c => c.CatCode, new { @Readonly = "true" })
                                }
                                @Html.ValidationMessageFor(c => c.CatCode)
                            </p>
                            <p>
                                <label>
                                    名称：
                                </label>
                                @Html.TextBoxFor(c => c.CatName, new { @class = "required" })
                                @Html.ValidationMessageFor(c => c.CatName)
                            </p>
                            <p>
                                <label>
                                    可排架机计划：
                                </label>
                                @Html.CheckBoxFor(c => c.IsSchPlan, new { @onclick = "return false" })
                            </p>
                            <p>
                                <label>
                                    启用：
                                </label>
                                @Html.CheckBoxFor(c => c.IsEnable, new { @onclick = "return false" })
                            </p>
                            <p style="width:100%;">
                                <label>
                                    备　　注：
                                </label>
                                @Html.TextAreaFor(c => c.Remark, new { style = "width:65%;height:50px;" })
                                @Html.ValidationMessageFor(c => c.Remark)
                            </p>
                            <p></p>
                            <p></p>
                        </div>
                    </div>
                </div>
                <b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b>
            </div>
            <div class="MyPanel">
                <b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b>
                <div class="b d1 k">
                    <div class="Title">参数项目</div>
                    <div class="Content">
                        <div inited="1000" style="display: block;">
                            <table class="list nowrap itemDetail" addbutton="新增" width="100%" isrownum="false">
                                <thead>
                                    <tr>
                                        <th type="text" name="items[#index#].itemString" size="25" fieldclass="required" fieldattrs="{remote:'validate_remote.html', maxlength:10}">参数项目编码</th>
                                        <th type="text" name="items[#index#].itemString" size="12" fieldclass="required" fieldattrs="{remote:'validate_remote.html', maxlength:10}">参数项目名称</th>
                                        <th type="enum" name="items[#index#].itemEnum" enumurl="BaseData/EquipmentCategory/Select1" size="12">特殊项</th>
                                        <th type="text" name="items[#index#].itemString" size="12" fieldclass="required" fieldattrs="{remote:'validate_remote.html', maxlength:10}">项目说明</th>
                                        <th type="enum" name="items[#index#].itemEnum" enumurl="BaseData/EquipmentCategory/Select" size="12">启用</th>
                                        <th type="del" width="60">操作</th>
                                    </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b>
            </div>
            <div class="MyPanel">
                <b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b>
                <div class="b d1 k">
                    <div class="Title">设备组</div>
                    <div class="Content">
                        <div inited="1000" style="display: block;">
                            <table class="list nowrap itemDetail" addbutton="新增" width="100%" isrownum="false">
                                <thead>
                                    <tr>
                                        <th type="text" name="items[#index#].itemString" size="12" fieldclass="required" fieldattrs="{remote:'validate_remote.html', maxlength:10}">设备组编码</th>
                                        <th type="text" name="items[#index#].itemString" size="12" fieldclass="required" fieldattrs="{remote:'validate_remote.html', maxlength:10}">设备组名称</th>
                                        <th type="text" name="items[#index#].itemString" size="12" fieldclass="required" fieldattrs="{remote:'validate_remote.html', maxlength:10}">备注</th>
                                        <th type="enum" name="items[#index#].itemEnum" enumurl="BaseData/EquipmentCategory/Select" size="12">启用</th>
                                        <th type="del" width="60">操作</th>
                                    </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b>
            </div>
            @Html.Partial("Operation", Model)
        </div>
        @Html.Partial("FormButtonBar")
    </form>
</div>
